﻿@using SCMS.Resource
@model SCMS.UI.Models.SalaryPayment
@{AjaxOptions ajaxOpts = new AjaxOptions
      {
          UpdateTargetId = "SPtDiv",
          LoadingElementId = "loading",
          HttpMethod = "Post",
          Url = Url.Action("SaveSalaryPayment")
      };}
<script src="@Url.Content("~/Scripts/js/jquery-1.7.2.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/js/procument.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<div class="partialViewCard">
    <div class="partialViewCardHeader">
        <h3>@Resources.Global_String_SalaryPayment</h3>
    </div>
    <br />
    @using (Ajax.BeginForm(null, null, ajaxOpts, new { @class = "form" }))
    {
        @Html.ValidationSummary(true)
        <table width="98%" align="center" cellpadding="0">
            <tr>
                <th align="center" width="33.3%">
                    @Resources.Global_String_SalaryPaymentNo
                </th>
                <th align="center" width="33.3%">
                    @Resources.SalaryPayment_LoadSalaryPayment_PaymentDate
                </th>
                <th align="center" width="33.3%">
                    @Resources.Global_String_Currency
                </th>
            </tr>
            <tr>
                <td align="center">
                    @Html.TextBoxFor(m => m.EntitySalaryP.RefNumber, new { @readonly = "readonly" })
                    @Html.HiddenFor(m => m.EntitySalaryP.Id)
                    @Html.HiddenFor(m => m.EntitySalaryP.TotalPayroll)
                </td>
                <td align="center">
                    @Html.EditorFor(m => m.EntitySalaryP.PayrollDate)
                    @Html.ValidationMessageFor(m => m.EntitySalaryP.PayrollDate, Resources.Global_String_Required)
                </td>
                <td align="center">
                    @Html.DropDownListFor(x => x.EntitySalaryP.SalaryCurrencyId, Model.Currencies, Resources.Global_String_PleaseSelect, new { @id = "currencyId" })
                    @Html.ValidationMessageFor(x => x.EntitySalaryP.SalaryCurrencyId, Resources.Global_String_Required)
                </td>
            </tr>
            <tr>
                <th align="center">
                    @Resources.Global_String_Month
                </th>
                <th align="center">
                    @Resources.Global_String_Year
                </th>
                <th align="center">
                    @Resources.Global_String_Office
                </th>
            </tr>
            <tr>
                <td align="center">
                    @Html.DropDownListFor(x => x.EntitySalaryP.Month, Model.Months, Resources.Global_String_PleaseSelect)
                    @Html.ValidationMessageFor(x => x.EntitySalaryP.PayrollMonth, Resources.Global_String_Required)
                </td>
                <td align="center">
                    @Html.TextBoxFor(x => x.EntitySalaryP.PayrollYear, new { @class = "numericTb"})
                    @Html.ValidationMessageFor(x => x.EntitySalaryP.PayrollYear, Resources.Global_String_OnlyNumericRequired)
                </td>
                <td align="center">
                    @Html.DropDownListFor(x => x.EntitySalaryP.SubOfficeId, Model.Offices, Resources.Global_String_PleaseSelect)
                    @Html.ValidationMessageFor(x => x.EntitySalaryP.SubOfficeId, Resources.Global_String_Required)
                </td>
            </tr>
            <tr>
                <th align="center">
                    @Resources.Global_String_SubjectPurpose
                </th>
                <th align="center" colspan="2">
                    @Resources.Global_String_Remarks
                </th>
            </tr>
            <tr>
                <td align="center">
                    @Html.TextBoxFor(m => m.EntitySalaryP.Subject)
                    @Html.ValidationMessageFor(m => m.EntitySalaryP.Subject, Resources.Global_String_Required)
                </td>
                <td align="center" colspan="2">
                    @Html.TextBoxFor(x => x.EntitySalaryP.Remarks)
                    @Html.ValidationMessageFor(x => x.EntitySalaryP.Remarks, Resources.Global_String_Required)
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="3" align="right">
                    <input type="submit" class="btn green" value="  @Resources.Global_String_Proceed  " />
                </td>
            </tr>
        </table>
    
    }
</div>
